<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\captcha\Captcha;
$this->title = 'test后台登录';
//$this->params['breadcrumbs'][] = $this->title;
?>

<div class="site-login">
    <h1><?= Html::encode($this->title) ?></h1>


<!--        <div class="col-md-4">-->
<!--            <form class="form-horizontal" role="form" method="post">-->
<!--                <div class="form-group">-->
<!--                    <div class="col-sm-10">-->
<!--                        <input type="text" name="curl_token" value="--><!--" class="sr-only" id="firstname"-->
<!--                               placeholder="token">-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <label for="firstname" class="col-sm-2 control-label">帐号</label>-->
<!--                    <div class="col-sm-10">-->
<!--                        <input type="text" name="name" class="form-control" id="firstname"-->
<!--                               placeholder="帐号">-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <label for="lastname" class="col-sm-2 control-label">密码</label>-->
<!--                    <div class="col-sm-10">-->
<!--                        <input type="password" name="namepassword" class="form-control" id="lastname"-->
<!--                               placeholder="密码">-->
<!--                    </div>-->
<!--                </div>-->
<!---->
<!--                <div class="form-group">-->
<!--                    <div class="col-sm-offset-2 col-sm-10">-->
<!--                        <div class="checkbox">-->
<!--                            <label>-->
<!--                                <input type="checkbox"> 请记住我-->
<!--                            </label>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <div class="col-sm-offset-2 col-sm-10">-->
<!--                        <button type="submit" class="btn btn-default">登录</button>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </form>-->
<!--        </div>-->
    <?php $form = ActiveForm::begin([

                                        'id' => 'login-form',
                                        'options' => ['class' => 'form-horizontal'],
                                        'fieldConfig' => [
                                            'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>",
                                            'labelOptions' => ['class' => 'col-lg-1 control-label'],
                                        ],
                                    ]); ?>

    <?= $form->field($model, 'username')->textInput(['autofocus' => true])->label('帐号') ?>

    <?= $form->field($model, 'password')->passwordInput()->label('密码') ?>

    <div class="form-group">
        <div class="col-lg-offset-1 col-lg-11">
            <?= Html::submitButton('登录', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
        </div>
    </div>

    <?php ActiveForm::end(); ?>

</div>
